﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FilStartUps.FILAPI;

namespace FilStartUps.Controls
{
    public partial class FilStartUps_PageInfo : System.Web.UI.UserControl
    {
        private void GetPageInfo(int pageid)
        {
            try
            {
                var pageinfo = FilStartUpsAPI.GetPageInfo(pageid);
                lbpagename.Text = pageinfo.pagetitle;
                ltpagedescription.Text = pageinfo.pagedescription;
            }
            catch (Exception)
            {

            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                int pageidPK = Convert.ToInt32(Request.QueryString["pg"].Trim());
                if (pageidPK != 0)
                {
                    GetPageInfo(pageidPK);
                }
            }
        }
    }
}